<template>
  <div class="aboutUs">
    <div class="topheader">
      <span>成为中小企业的助推器</span>
    </div>
    <div class="warpcontent">
      <div class="leftbox">
        <ul>
          <li
            v-for="item in list"
            :key="item.link"
            @click="jump(item.link)"
            :class="[$route.path == item.link ? 'checked' : '']"
          >
            {{ item.title }}
          </li>
        </ul>
      </div>
      <div class="rightbox">
        <NuxtChild />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [
        {
          title: "公司介绍",
          link: "/linkUs/companyIntroduction"
        },
        {
          title: "经营范围",
          link: "/linkUs/businessScope"
        },
        {
          title: "发展历程",
          link: "/linkUs/developmentHistory"
        },
        {
          title: "企业文化",
          link: "/linkUs/enterpriseCulture"
        },
        {
          title: "荣誉资质",
          link: "/linkUs/honorQualification"
        },
        {
          title: "组织架构",
          link: "/linkUs/organizationalStructure"
        }
      ]
    };
  },
  mounted() {
    this.$router.push({ path: "/linkUs/companyIntroduction" });
  },
  computed: {
    key() {
      return this.$route.name !== undefined
        ? this.$route.name + new Date()
        : this.$route + new Date();
    }
  },
  methods: {
    jump(path) {
      this.$router.push({ path });
    }
  }
};
</script>
<style lang="scss" scoped>
.aboutUs {
  .topheader {
    width: 100%;
    height: 734px;
    background: url("http://syg-photo.oss-cn-shanghai.aliyuncs.com/yingdin/photo/bg.png-1593654323000") no-repeat;
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    span {
      font-size: 72px;
      font-weight: normal;
      font-stretch: normal;
      line-height: 43px;
      letter-spacing: 5px;
      color: #ffffff;
    }
  }
  .warpcontent {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    li {
      width: 167px;
      height: 48px;
      cursor: pointer;
      text-align: center;
      line-height: 48px;
      border-top: solid 1px #a6a6a6;
      border-left: solid 1px #a6a6a6;
      border-right: solid 1px #a6a6a6;
    }
    li:last-of-type {
      border-bottom: 1px solid #a6a6a6;
    }
    .checked {
      background-color: #4eaeff;
      color: #fff;
    }
    .rightbox {
      width: 1033px;
    }
  }
}
</style>
